package com.ai.spring.chat;

import dev.langchain4j.model.openai.OpenAiChatModel;

/**
 * @author xp
 * @date 2024/10/21 10:59
 * @description
 */
public class OpenAiChatTest {

    interface Writer {
        String write(String title);
    }

    public static void main(String[] args) {
        OpenAiChatModel model = OpenAiChatModel.builder()
                .baseUrl("http://langchain4j.dev/demo/openai/v1")
                .apiKey("demo").build();
        String answer = model.generate("你可以做什么");
        System.out.println(answer);
    }

}
